<template>
    <div class="main-container">
        <el-container class="main-div">
            <el-header height="50px">
                <AdminHeader v-if="user_type != null" :type="user_type"></AdminHeader>
            </el-header>
            <el-main>
                <router-view></router-view>
            </el-main>
            <el-footer height="30px" class="text-12px">&COPY;版权所有&copysr;</el-footer>
        </el-container>
    </div>
</template>
<script>
import AdminHeader from './AdminHeader.vue';
import { useLoginStore } from '../../store';
export default {
    name: "Index",
    components: { AdminHeader, },
    data() {
        return {
            user_type: null,
        }
    },
    mounted() {
        const store = useLoginStore();
        this.user_type = store.user_type;
    }
}
</script>

<style scoped>
.el-header,
.el-footer {
    background-color: #B3C0D1;
    color: #333;
}

.el-header {
    padding: 0 0;
    height: 50px;
}

.el-footer {
    text-align: center;
    height: 30px;
}

.el-main {
    background-color: #E9EEF3;
    color: #333;
    height: auto;
}

.main-container {
    height: 100vh;
}

.main-div {
    height: 100%;
}
</style>